//
//  Singleton.m
//  chanyou
//
//  Created by leon on 15/1/8.
//  Copyright (c) 2015年 wanli. All rights reserved.
//

#import "Singleton.h"

static Singleton *share = nil;
@implementation Singleton

- (void)dealloc
{
    [super dealloc];
}

+ (instancetype)shareInstance
{
    static dispatch_once_t once;
    dispatch_once(&once, ^{
        if (!share) {
            share = [[Singleton alloc] init];
        }
    });
    return share;
}

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.loginDefault = [NSUserDefaults standardUserDefaults];
    }
    return self;
}

@end
